package com.atguigu.tingshu.album.service;

import com.atguigu.tingshu.model.album.TrackInfo;
import com.atguigu.tingshu.query.album.TrackInfoQuery;
import com.atguigu.tingshu.vo.album.*;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

public interface TrackInfoService extends IService<TrackInfo> {

    //保存声音
    void saveTrackInfo(TrackInfoVo trackInfoVo, Long userId);

    void saveTrackStat(Long trackId, String statType, int statNum );

    IPage<TrackListVo> findUserTrackPage(IPage<TrackListVo> pageInfo, TrackInfoQuery trackInfoQuery);

    void updateTrackInfo(TrackInfoVo trackInfoVo, Long id);

    void removeTrackInfo(Long id);
//分页查询专辑下声音列表(动态渲染付费标识)
    IPage<AlbumTrackListVo> findAlbumTrackPage(IPage<AlbumTrackListVo> albumTrackListVoPage, Long albumId, Long userId);
//查询声音统计信息
    TrackStatVo getTrackStatVo(Long trackId);
//更新DB中的声音/专辑的统计数值
    void updateTrackStat(TrackStatMqVo mqVo);
}
